Download
Rdbi RdbiPgSQL
these two packages from http://www.bioconductor.org/repository/release1.5/package/html/index.html
Install
R CMD INSTALL ~/Library/R/ rdbi.tar.gz
or
> install.packages("rdbi",lib="~/Library/R/") > library(Rdbi) > library(RdbiPgSQL) > conn <- dbConnect(PgSQL(), host = "10.10.118.118", dbname = "expression") > res <- dbSendQuery(conn,"select * from exonarray.probe limit 10;") > mydata <- dbGetResult(res) > mydata id probesetid coordinates sequence crosshybridizes 1 494998 2315101 (917,193) cacgggaagtctgggctaagagaca TRUE 2 1734213 2315101 (1092,677) acaggggccagaagatgaacaatgg TRUE 3 4767517 2315101 (796,1862) attaagttacatgcagacaacaggg TRUE 4 4286427 2315101 (986,1674) tgcctggttgtggtattaagttaca TRUE 5 5760145 2315102 (144,2250) tcggccgtcgtcttctgcagctctg TRUE 6 671410 2315102 (689,262) aagtcggccgtcgtcttctgcagct TRUE 7 4275780 2315102 (579,1670) tccaagtcggccgtcgtcttctgca TRUE 8 4293462 2315102 (341,1677) tgtgatccaagtcggccgtcgtctt TRUE 9 5388 2315103 (267,2) ctgtctgtcgacccagctggaggca TRUE 10 6528805 2315103 (804,2550) ccctgtctgtcgacccagctggagg TRUE
Functions in Rdbi
Function Description dbAppendTable Appends data to a database table dbClearResult Clears resources associated with a query result dbColumnInfo Returns type information about a result column dbConnect Connect to a database dbConnectionInfo Returns a list of connection status attributes dbDisconnect Closes a database connection dbGetQuery Submit a query string and fetch results dbGetResult Fetch results from a query dbListTables Lists database tables dbReadTable Reads a table into a data frame dbReconnect Reopens a connection to a database dbResultInfo Returns information about a query result dbSendQuery Submits a query string to the database backend dbWriteTable Writes a data frame to a database table
Hide Comments